﻿
#ifndef FACTGROUP_H
#define FACTGROUP_H


#include <QObject>
#include "Fact.h"
#include <QList>
class FactGroup : public QObject
{
    Q_OBJECT
public:
    FactGroup(QObject *parent = nullptr);

    Q_INVOKABLE bool  factExists (const QString& name);
    Q_INVOKABLE Fact* getFact    (const QString& name);
    Q_INVOKABLE QStringList  factNames(void);
    Q_INVOKABLE void resetAllFact();

    bool addFact (Fact* fact);
signals:
    void factNamesChanged           (void);
private:
     QList<Fact*>            facts_;
     QStringList             factNames_;
};

#endif // FACTGROUP_H
